<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Account Databases</title>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta http-equiv="Content-Style-Type" content="text/css">
</head>
<body>

<p>Click <em>File-&gt;Open</em> or <em>Save</em> to open or save a database.
<p>See Also: <a href="Exporting.to.a.Mobile.Device.html">Synchronizing with a Phone/PDA</a></p>

<div class="contents">
  <h2>Contents</h2>
  <ol>
    <li><a href="#creating">Creating a New Database</a></li>
    <li><a href="#opening">Opening an Existing Database</a></li>
    <li><a href="#saving">Exporting / Saving a Database</a></li>
    <li><a href="#importing">Importing</a></li>
    <li><a href="#portable">Using an External / Portable Database</a></li>
    <li><a href="#password">Changing the Password</a></li>
    <li><a href="#autolock">Re-locking</a></li>
    <li><a href="#descriptors">Database Descriptor Files</a></li>
    <li><a href="#formats">Available Formats</a></li>
  </ol>
</div>

<h2><a name="creating">Creating a New Database</a></h2>
<p>Click <em>File-&gt;New-&gt;Database</em> to create a new database. Select the database type and encryption, enter a password then click <em>Create</em>.</p>
<img alt="Creating a database" src="img/creatingdatabase.png" class="centered"/>
<p>Check <em>Open when the application starts</em> to automatically open the new database every time LockCrypt starts.</p>
<p>If <em>Also create a database descriptor</em> is checked, a <a href="#descriptors">database descriptor</a> will also be created which can be double clicked, allowing you to open a database without knowing the type or encryption algorithm.</p>

<h2><a name="opening">Opening an Existing Database</a></h2>
<p>Click <em>File-&gt;Open</em> to open an existing database. You must know the type of encryption the file uses even if you're unsure of it's format. If <em>Auto</em> is selected, LockCrypt will attempt to guess the format and assume it uses and empty password.</p>
<img alt="Password prompt" src="img/promptpass.png" class="centered"/>
<p>If the database is password protected, a prompt will be shown.</p>

<h2><a name="saving">Exporting / Saving a Database</a></h2>
<p>Click <em>File-&gt;Save</em> to save a copy of the currently loaded database.</p>

<h2><a name="importing">Importing</a></h2>
<p>To import an account database, click <em>File-&gt;Open</em>, then select the file format.</p>

<h2><a name="portable">Using an External / Portable Database</a></h2>
<p>If one is set, LockCrypt will try to open the database from the preferred location specified in the <em>Options</em> dialog. To open a different file, specify it as a parameter when launching LockCrypt.exe. If you use the installer, a file extension can be automatically created.</p>
<p>See also: <a href="Command.Line.Options.html">Command Line Options</a>.</p>

<h2><a name="password">Changing the Password</a></h2>
<p>Click <em>File-&gt;Change Password</em> to change the database password.</p>

<h2><a name="autolock">Automatic Re-locking</a></h2>
<p>LockCrypt can automatically re-lock after a specified length of inactivity. Select <em>Tools-&gt;Options</em> to configure auto-lock. LockCrypt can either close the database so you need to re-open it with <em>File-&gt;Open</em>, or just lock it and reprompt for a password. This can be configured in <em>Tools-&gt;Options</em>.</p>
<p>The database can be re-locked or closed manually from the <em>File</em> menu.</p>

<h2><a name="descriptors">Database Descriptor Files</a></h2>
<p>Descriptor files can be used to save needing to remember the type of database type (both XML and SQLite use .lce by default) and the encryption algorithm. Database descriptor files are just text files with a .lcd extension. They allow specifying the database connection details, encryption algorithm and password and use the same format as <a href="Command.Line.Options.html">command line arguments</a>, with one argument per line. LockCrypt will prompt for any unspecified options when the file is opened (eg: if the password is ommited).</p>
<p>Descriptors must contain '<em>lockcrypt db</em>' on the first line, with the arguments on each line thereafter.</p>
<p>The path to the actual file can be relative or absolute. If a relative path is given (ie: just a filename), LockCrypt looks in the directory of the descriptor file, then in the application directory (where <em>LockCrypt.exe</em> is located). This is normally the directory where you installed LockCrypt. You may wish to keep the actual database on a USB stick and a descriptor file on a PC for example.</p>
<h3>Examples</h3>
<p>The file below would open an SQLite database called '<em>sqlite-aes-password3.db3</em>' in the same directory as the descriptor file, using 256bit AES encryption with a password of '<em>apple</em>'.</p>
<pre>
lockcrypt db
-db=sqlite-aes-passwordapple.lce
-m=sqlite
-pw=apple
-e=aes256
</pre>

<p>This would open an XML database called '<em>xml-aes.lce</em>' in the specified directory as the descriptor file, using 256bit AES encryption with a password of '<em>apple</em>'. If the database uses a password, LockCrypt will prompt you to enter it.</p>
<pre>
lockcrypt db
-db:C:\LockCrypt Databases\xml-aes.lce
-m:xml
-e:aes256
</pre>

<p>The file below would connect to a MySQL database on server <em>pegasus</em>, authenticating as user <em>ic.weiner</em> and password <em>littles3cret</em>, with <em>lockcrypt</em> as the database name.</p>
<pre>
lockcrypt db
-dbhost=pegasus
-dbport=3306
-dbuser=ic.weiner
-dbpass=littles3cret
-dbdatabase=lockcrypt
-m=mysql
-e=aes256
</pre>

<h2><a name="formats">Available Formats</a></h2>
<ul>
  <li><strong>XML</strong> is the preferred way to store data. It is always guaranteed to be compatible between versions.</li>
  <li><strong>SQLite</strong> is an alternative to XML which can not always be migrated between versions.</li>
  <li><strong>MySQL</strong> stores data in an encrypted format on a MySQL server.</li>
  <li>
    <p><strong>Legacy Format</strong> is used by LockCrypt for Java and uses either a proprietory file structure or XML file.</p>
    <p><strong>Note: </strong>The legacy format does not allow groups to be nested, and is primarily intended for importing from earlier versions.</p>
  </li>
</ul>
<!--p>LockCrypt supports exporting to CSV, XML, plain text and LockCrypt database (.lce) files.</p-->

</body></html>
